home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
qbsnip.zip
/
SPRIT_EX.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-11-17
|
1KB
|
35 lines
'Sprite Example
'Author Unknown
DEFINT A-Z
SCREEN 13
PALETTE 255, 1024 * 15 'Change color 255 so it's visible
DIM Image(0 TO 33), Scr(0 TO 33), OldBuff(0 TO 33)
InColr = 4 'The inner color of the circle
OutColr = 3 'The color of its outer ring
CIRCLE (5, 5), 4, OutColr 'Draw original Image -- make transparent
PAINT (5, 5), InColr, OutColr 'areas Color 0
GET (1, 2)-(9, 8), Image
LINE (16, 2)-(24, 8), 255, BF 'Draw its compliment -- Color 0
CIRCLE (20, 5), 4, 0 'for solid areas, Color 255 (or 15 in EGA
PAINT (20, 5), 0, 0 'modes) for transparent areas
GET (16, 2)-(24, 8), Scr
CLS
FOR Repeat = 1 TO 9 'Draw a background pattern
LINE (0, 20 * Repeat)-(320, 200), Repeat + 20, BF
NEXT
FOR Repeat = 1 TO 300 'Draw the sprites
y = 96: x = x + 1
GET (x, y)-(x + 8, y + 6), OldBuff
PUT (x, y), Scr, AND
PUT (x, y), Image, OR
FOR delay% = 1 TO 4000: NEXT
PUT (x, y), OldBuff, PSET
NEXT
SCREEN 0: WIDTH 80: COLOR 7, 0: CLS : END